package com.zhehekeji.opsys.api.webservice.server;

import javax.annotation.Resource;
import javax.jws.WebService;

import com.zhehekeji.opsys.api.resp.*;
import org.apache.cxf.interceptor.InInterceptors;
import org.apache.cxf.interceptor.OutInterceptors;
import org.apache.cxf.transport.common.gzip.GZIPInInterceptor;
import org.apache.cxf.transport.common.gzip.GZIPOutInterceptor;

import com.zhehekeji.opsys.api.service.manager.IOperationManagerService;

/**
 * @ClassName OperationManagerWS
 * @Description TODO
 * @author chenweiliu chenwei.liu@163.com
 * @date 2015-7-7   下午2:41:17
 */
//@InInterceptors(classes={GZIPInInterceptor.class, LoggingInInterceptor.class})
//@OutInterceptors(classes={GZIPOutInterceptor.class, LoggingOutInterceptor.class})
@InInterceptors(classes={GZIPInInterceptor.class})
@OutInterceptors(classes={GZIPOutInterceptor.class})
@WebService(endpointInterface="com.zhehekeji.opsys.api.webservice.server.OperationManager",
name="operationManager",portName="operationManagerPort",serviceName="operationManagerWS")
public class OperationManagerWS implements OperationManager {

	@Resource(name="operationManagerService")
	private IOperationManagerService operationManagerService;
	
	public void setOperationManagerService(
			IOperationManagerService operationManagerService) {
		this.operationManagerService = operationManagerService;
	}

	@Override
	public GetProductListResp getProductList(Long cpCode, int firstIndex, int maxResult) {
		
		GetProductListResp resp = operationManagerService.getProductList(cpCode, firstIndex, maxResult);
		return resp;
		
	}

	@Override
	public GetProductDetailResp getProductDetail(String productCode) {
		
		GetProductDetailResp resp = operationManagerService.getProductDetail(productCode);
		return resp;
		
	}

	@Override
	public GetCategoryDetailResp getCategoryDetail(String categoryCode) {
		
		GetCategoryDetailResp resp = operationManagerService.getCategoryDetail(categoryCode);
		return resp;
		
	}

	@Override
	public GetCategoryListResp getCategoryList(Long cpCode, String categoryCode, int firstIndex, int maxResult) {

		GetCategoryListResp resp = operationManagerService.getCategoryList(cpCode, categoryCode, firstIndex, maxResult);
		return resp;

	}

	@Override
	public GetContentListResp getContentList(String categoryCode, String tag, String order, int firstIndex, int maxResult) {

		GetContentListResp resp = operationManagerService.getContentList(categoryCode, tag, order, firstIndex, maxResult);
		return resp;

	}

	@Override
	public GetContentDetailResp getContentDetail(String contentCode, String productCode) {

		GetContentDetailResp resp = operationManagerService.getContentDetail(contentCode, productCode);
		return resp;

	}

	@Override
	public GetContentListResp getSeriesSubsetList(String seriesCode, int firstIndex, int maxResult) {

		GetContentListResp resp = operationManagerService.getSeriesSubsetList(seriesCode, firstIndex, maxResult);
		return resp;

	}

	@Override
	public GetContentListResp getRecommendList(String contentCode, String productCode, int firstIndex, int maxResult) {
		
		GetContentListResp resp = operationManagerService.getRecommendList(contentCode, productCode, firstIndex, maxResult);
		return resp;
		
	}

	@Override
	public GetScrollmsgListResp getScrollmsgList(long cpCode, int firstIndex, int maxResult) {
		
		GetScrollmsgListResp resp = operationManagerService.getScrollmsgList(cpCode, firstIndex, maxResult);
		return resp;
	}

	@Override
	public GetScrollmsgDetailResp getScrollmsgDetail(String code) {
		
		GetScrollmsgDetailResp resp = operationManagerService.getScrollmsgDetail(code);
		return resp;
	}

	@Override
	public GetContentListResp getSearchList(String searchWord, String productCode, int firstIndex, int maxResult) {
		
		GetContentListResp resp = operationManagerService.getSearchList(searchWord, productCode, firstIndex, maxResult);
		return resp;
	}

	@Override
	public GetChannelListResp getChannelList(Long cpCode, String zoneCode, int firstIndex, int maxResult) {
        GetChannelListResp resp = operationManagerService.getChannelList(cpCode, zoneCode, firstIndex, maxResult);

        return resp;
	}

    @Override
    public GetChannelSchedProgramListResp getSchedProgramList(String channelCode, String day) {
        GetChannelSchedProgramListResp resp = operationManagerService.getChannelSchedProgramList(channelCode, day);

        return resp;
    }
}
